﻿<%@ Page Title="用户管理" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="UserManageList.aspx.cs" Inherits="OUSMS.UserManageList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="topchannel">
        用户管理
    </div>
    <asp:GridView ID="userGridView" runat="server" AutoGenerateColumns="False" CssClass="table1"
        ItemType="OUSMS.AppLogic.DataAccessLayer.Users"
        SelectMethod="userGridView_GetData"
        AllowPaging="True" 
        ShowHeaderWhenEmpty="True" EmptyDataText="没有用户"
        OnRowDataBound="userGridView_RowDataBound">
        <Columns>
             <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <asp:Label ID="indexLbl" runat="server" Font-Bold="true"></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="false" Width="30px"/>
                <ItemStyle HorizontalAlign="center" VerticalAlign="Middle" Width="30px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="登录名">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("LoginName") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="False" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="姓名">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="False" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="电话">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("Phone") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="False" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="一级部门">
                <ItemTemplate>
                    <%# Item.Departments.Name %>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="False" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="二级部门">
                <ItemTemplate>
                    <%# Item.SecondDepartments.Name %>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="False" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="查看">
                <ItemTemplate>
                    <asp:HyperLink ID="detailHypeLnk" runat="server" NavigateUrl='<%# "~/UserDetail.aspx?UID="+Item.ID %>'>查看</asp:HyperLink>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="False" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="修改">
                <ItemTemplate>
                    <asp:HyperLink ID="editHyperLnk" runat="server" NavigateUrl='<%# "~/EditUser.aspx?UID="+Item.ID %>'>修改</asp:HyperLink>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="False" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <%--<asp:TemplateField HeaderText="角色分配">
                <ItemTemplate>
                    <asp:HyperLink ID="assignRoleHypeLnk" runat="server" NavigateUrl='<%# "~/AssignUserRole.aspx?UID="+Item.ID %>'>角色分配</asp:HyperLink>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="False" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>--%>
        </Columns>
        <HeaderStyle CssClass="row2" />
        <PagerStyle CssClass="rowend" HorizontalAlign="Center" />
        <RowStyle CssClass="row1" />
        <AlternatingRowStyle CssClass="row2" />
        <EmptyDataRowStyle CssClass="row1" />
    </asp:GridView>
</asp:Content>
